<!--模态框-->
<div id="modalAdd" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true">
    <input type="hidden" id="userNameSession" th:value="${session.user.userName}">
    <div class="modal-dialog">
        <div class="modal-content">

            <div class="modal-header">
                <h4 class="modal-title" id="myModalLabel">添加试卷</h4>
                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span>
                </button>
            </div>
            <div class="modal-body">
                <!--javascript:void(0);设置form为无动作-->
                <form action="javascript:void(0);" class="form-horizontal">

                    <div class="form-group row">
                        <label class="control-label col-md-4">测试阶段</label>
                        <div class="col-md-8">
                            <select class="form-control" v-model="model.paperType">
                                <option selected="selected">Java_SE</option>
                                <option>Java_Framework</option>
                                <option>Front_Js</option>
                            </select>
                        </div>
                    </div>

                    <div class="form-group row">
                        <label class="control-label col-md-4">试卷标题</label>
                        <div class="col-md-8">
                            <div class="input-group">
                                <div class="input-group-prepend">
                                    <span id="typeSpan" class="input-group-text">{{model.paperType}}</span>
                                </div>
                                <input
                                        class="form-control"
                                        type="text"
                                        v-model="model.subject"
                                />
                            </div>
                        </div>
                    </div>

                    <div class="form-group row">
                        <label class="control-label col-md-4">试题类型</label>
                        <div class="col-md-8">
							<span v-for="(question, index) in questions">
                                <!-- “:” 是指令 “v-bind”的缩写 -->
								<input type="checkbox" :value="question.id" v-model="model.questions"/>{{question.type}}
							</span>
                        </div>
                    </div>

                    <div class="form-group row">
                        <label class="control-label col-md-4">考试时间</label>
                        <div class="col-md-8">
                            <select class="form-control" v-model="model.totalTime">
                                <option>45</option>
                                <option>60</option>
                                <option>90</option>
                                <option>120</option>
                            </select>
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-primary" data-dismiss="modal" @click="addModel()">
                    新增
                </button>
            </div>
        </div>
    </div>
</div>
